{extend name="public/iframe" /}
{block name="top"}
{:load_assets('viewerjs,bootstrap-table-treegrid,datatable','css')}
{/block}
{block name="content"}
<div class="card">
    <div class="card-header card-header-stretch">
        <div class="card-toolbar">
            <ul class="nav nav-tabs nav-line-tabs nav-stretch fs-6 border-0">
                {foreach name="types" item="type"}
                <li class="nav-item">
                    <a class="nav-link {eq name='type.key' value='$ctype'}active{/eq}"  href="{:url('index',['type'=>$type.key])}">{notempty name="type.icon"}<i class="{$type.icon}"></i> {/notempty}{$type.title|default=''}</a>
                </li>
                {/foreach}
            </ul>
        </div>
    </div>

    <div class="card-body">
        <div class="tab-content">
            <div class="tab-pane fade active show" id="tab1" role="tabpanel">
                <div class="d-none" id="search-form">
                    <form method="post">
                        <div class="row">
                            <div class="col-12 col-sm-6 col-md-4 col-lg-3 col-xxl-2">
                                <div class="row mb-1">
                                    <label  class="col-4 col-form-label text-nowrap text-truncate d-flex justify-content-start justify-content-md-center justify-content-lg-end">油站名称</label>
                                    <div class="col-8">
                                        <input type="text" class="form-control form-control-sm" name="type" value="{$ctype|default=''}">
                                        <input type="hidden" name="type-operate" value="=">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div id="toolbar">
                    <a href="javascript:;" class="btn btn-primary btn-sm btn-add" data-title="添加分类" data-url="{:url('add',['type'=>$ctype])}" data-height="700px"><i class="fa fa-plus-circle"></i>添加</a>
                    <a href="javascript:;" class="btn btn-primary btn-sm btn-edit-multi need-checked"><i class="fas fa-pencil-alt"></i>修改</a>
                    <a href="javascript:;" class="btn btn-danger btn-sm btn-del-multi need-checked"><i class="fa fa-trash-alt"></i>删除</a>
                    <a href="javascript:;" class="btn btn-dark btn-sm btn-toggle-all"><i class="fas fa-angle-double-down"></i>全部展开</a>
                </div>
                <table id="datatable"  data-operate-edit="true" data-operate-del="true">

                </table>
            </div>
        </div>
    </div>
</div>
{/block}

{block name="bottom"}
{:load_assets('viewerjs,datatable,bootstrap-table-treegrid','js')}
{:load_module_assets()}
{/block}